<?php
@error_reporting(E_ALL ^ E_NOTICE);

define('REWRITE', true);
define('HTMLEXT', '.html');
define('SITEDIR', dirname(__FILE__));
define('ROOTDIR', dirname(__FILE__) .'/webapp');

// config
$config = array();
$config['cache'] = array(
	'mcd' => 'memcd://mcdhost:11211',
	'mdb' => 'memdb://mdbhost:11212'
);
$config['dbase'] = array(
	'mdb' => 'mysql://root:pwd@masterhost:3306/dbname',
	'sdb' => 'mysql://root:pwd@slavehost:3306/dbname'
);
$config['theme'] = array(
	'admin' => '/themes/manage',
	'*' => '/themes/default'
);
$config['rules'] = array(
	'(\w+)\/(\w+)\/(\d+)\/(\w+)\/(\d+)' => 'm=$1&c=$2&s=$3&a=$4&p=$5',
	'(\w+)\/(\w+)\/(\d+)\/(\w+)' => 'm=$1&c=$2&s=$3&a=$4',
	'(\w+)\/(\w+)\/(\d+)' => 'm=$1&c=$2&s=$3',
	'(\w+)\/(\w+)' => 'm=$1&c=$2',
	'(\w+)\/(\d+)' => 'm=$1&s=$2',
	'(\w+)' => 'm=$1'
);

// loader
require(dirname(__FILE__) .'/tinysupe/loader.php');
?>